<?php

namespace App\Http\Controllers;

use App\News;
use Carbon\Carbon;
use Illuminate\Http\Request;

class IndexController extends Controller
{
    public function forms(){
            $arr = News::latest()->updatetime()->get();
       // dd($arr);
            return view('forms',compact('arr'));
    }
    public function forms_add(Request $request){
        $arr = $request->all();
       // dd($arr);
        News::create($arr);
        return redirect('/forms');
    }
}
